home *** CD-ROM | disk | FTP | other *** search
- /*
- File: ClckInit.cpp
-
- Contains: Init routines for Clock part
-
- Owned by: Tantek Çelik
-
- Copyright: © 1994 - 1996 by Apple Computer, Inc., all rights reserved.
-
- Change History (most recent first):
-
- <2> 5/24/96 jpa 1246074: Call Mwerks init/terminate fns for
- native exceptions.
- <10> 11/2/95 RR Mods for Editor swapping
- <9> 9/29/95 TJ Removed the SOMInit Routine.
- <8> 8/11/95 jpa Call InitODMemory [1276412]
- <7> 5/25/95 jpa Don't export init routines.
- <6> 1/12/95 jpa Don't use obsolete Toolbox names [1211211]
- <5> 10/11/94 NP 1189812: Make Init routine pascal.
- <4> 9/29/94 RA 1189812: Mods for 68K build.
- <3> 8/18/94 jpa Added prototype for SOMInit to avoid a
- warning [1181839]
- <2> 8/17/94 CG #1181487: Call ClockNewClass to
- instantiate Clock by name.
- <1> 7/28/94 TÇ first checked in
- To Do:
- In Progress:
-
- */
-
-
- #include <som.xh>
- #include <somobj.xh>
-
- #ifndef _USERSRCM_
- #include <UseRsrcM.h>
- #endif
-
- #ifndef _ODMEMORY_
- #include <ODMemory.h>
- #endif
-
- #ifndef SOM_AppleTest_Clock_xh
- #include "Clock.xh"
- #endif
-
-
- #ifdef __MWERKS__
- extern "C" {
- void __initialize(); // From Metrowerks runtime library, Startup.c
- void __terminate();
- }
- #endif
-
-
- extern "C" pascal OSErr ClockCFMInit (CFragInitBlockPtr initBlkPtr);
- extern "C" pascal void ClockCFMTerminate( );
-
- pascal OSErr ClockCFMInit (CFragInitBlockPtr initBlkPtr)
- {
- #ifdef __MWERKS__
- __initialize(); // Initialize static data and construct any global objects
- #endif
- somNewClass(AppleTest_Clock);
- OSErr err;
- if( (err=InitODMemory()) != noErr ) return err;
- return InitLibraryResources(initBlkPtr);
- }
-
- pascal void ClockCFMTerminate( )
- {
- CloseLibraryResources();
- #ifdef __MWERKS__
- __terminate(); // Destruct static objects & clean up exception tables
- #endif
- }
-